package com.mls.fivedistrict.pojo;

import com.baomidou.mybatisplus.enums.IdType;

import java.util.Date;

import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;

import java.io.Serializable;
import java.util.List;

import com.baomidou.mybatisplus.annotations.Version;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.apache.ibatis.annotations.ResultMap;

/**
 * <p>
 * 用户角色关系表
 * </p>
 *
 * @author Five Team
 * @since 2018-05-16
 */
@Data
@Accessors(chain = true)
@TableName(value = "t_user_role", resultMap = "BaseResultMap")
public class UserRole extends Model<UserRole> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    private Long userId;
    private Long roleId;
    private Date createDate;
    private Date updateDate;
    private Long managerUserId;
    private String createBy;
    private Boolean isDelete;

    public Boolean getDelete() {
        return isDelete;
    }

    public void setDelete(Boolean delete) {
        isDelete = delete;
    }

    private transient Role role;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
